package com.roger.homecenterscreen.ui.utils

import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale

object TimeUtils {
    
    fun getCurrentTimeString(): String {
        val calendar = Calendar.getInstance()
        val timeFormat = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
        return timeFormat.format(calendar.time)
    }
    
    fun getCurrentDateString(): String {
        val calendar = Calendar.getInstance()
        val dateFormat = SimpleDateFormat("yyyy年MM月dd日", Locale.CHINA)
        return dateFormat.format(calendar.time)
    }
    
    fun getCurrentWeekString(): String {
        val calendar = Calendar.getInstance()
        val weekFormat = SimpleDateFormat("EEEE", Locale.CHINA)
        return weekFormat.format(calendar.time)
    }
    
    fun formatTime(hour: Int, minute: Int, second: Int): String {
        return String.format(Locale.CHINA, "%02d:%02d:%02d", hour, minute, second)
    }
    
    fun formatDate(year: Int, month: Int, day: Int): String {
        return String.format(Locale.CHINA, "%d年%02d月%02d日", year, month, day)
    }
} 